<template>
	<view>
		<basics v-if="PageCur=='basics'" :showState="showState"></basics>
		<mine v-if="PageCur=='mine'" :showState="showState"></mine>
		
		<view class="cu-bar tabbar bg-white shadow foot">
			<view :class="PageCur=='basics'?'action text-green':'action text-gray'" @click="NavChange" data-cur="basics">
				<view class="cuIcon-homefill"></view> 首页
			</view>
			<view class="action text-green" @click="orderList">
				<view class="cuIcon-newshot">
				</view>
				报告查询
			</view>
			<view :class="PageCur=='mine'?'action text-green':'action text-gray'" @click="NavChange" data-cur="mine">
				<view class="cuIcon-my">
				</view>
				我的
			</view>
		</view>
	</view>
</template>

<script>
	import basics from "@/pages/basics/home/home.vue"
	import mine from "@/pages/mine/home.vue"
	
	export default {
		components: {basics,mine},
		data() {
			return {
				PageCur: 'basics',
				moreState:0,
				showState:1,
				refresh:0
			}
		},
		onReady() {
		},
		methods: {
			NavChange: function(e) {
				this.PageCur = e.currentTarget.dataset.cur
			},
			orderList: function(e) {
				uni.navigateTo({
					url:"/pages/basics/orderList/orderList"
				})
			}
		},
		onReachBottom: function () {
			this.moreState++
			console.log('onReachBottom'+this.moreState);
		},
		onPullDownRefresh: function () {
			this.refresh++
			console.log('onPullDownRefresh'+this.refresh);
		},
		onShareAppMessage(res) {
			let self=this
		    return {
		      title: "猎阵生物",
		      path: 'pages/index/index'
		    }
		},
		onShow(){
			this.showState=this.showState+1
		}
	}
</script>

<style>
	
</style>
